{template header}

<div class="container">

<ol class="breadcrumb">
  <li><a href="{SITE_URL}">首页</a></li>
  <li class="active">任务</li>
</ol>

<div class="row">



<div class="col-md-8">

  <div class="panel panel-default">
    <div class="panel-body">
      {if is_array($arrTask)}

          <ul class="task_list">
            {loop $arrTask $key $item}
              <li style="padding-top: 15px;padding-bottom: 15px;border-bottom: 1px dashed #999999;width: 100%">

              <div class="userimg"><a href="{tsUrl('user','duty',array('id'=>$item[user][userid]))}"><img class="img-rounded" src="{$item[user][face]}" width="32" height="32" alt="{$item['user']['username']}" title="{$item['user']['username']}" /></a></div>

              <div class="task_title">
                <div class="title">
                  <a title="{$item[title]}" href="{tsUrl('task','show',array('id'=>$item[taskid]))}{$mylink}">{$item[title]}</a>

                </div>
                <div class="task_info">
<span style="float:left;">
 <a href="{tsUrl('user','topic',array('id'=>$item[userid]))}">{$item[user][username]}</a>
 {php echo getTime($item[addtime],time())}

</span>

<span style="float:right;">

<a href="{tsUrl('task','type',array('id'=>$item['typeid']))}">{$item[type][typename]}</a>


{if $item[count_userwish]>0}<a class="rank" style="color:#FFFFFF;" href="{tsUrl('task','show',array('id'=>$item[taskid]))}">{$item[count_userwish]}</a>{/if}
</span>
                </div>

              </div>

              <div class="clear"></div>

            </li>

            {/loop}

          </ul>

      {/if}

<div class="page">{$pageUrl}</div>
</div>
</div>


</div>



<div class="col-md-4">

<a class="btn btn-info btn-block btn-lg" href="{tsUrl('task','add')}">
<span class="glyphicon glyphicon-plus-sign"></span> 发任务</a>
<p></p>


  <div class="panel panel-default">
    <div class="panel-heading">类别</div>
    <div class="panel-body">

      <select onchange="jumptype(this.options[this.options.selectedIndex].value)" name="typeid" class="form-control">
        <option value="">选择类别</option>
        {loop $arrType $key $item}
        <option value="{$item['typeid']}" {if $item['typeid']==$typeid}selected{/if}>{$item['typename']}</option>
        {/loop}
      </select>
      <!--
{loop $arrGroup $key $item}s
  <a class="btn btn-link" href="{tsUrl('task','group',array('id'=>$item['groupid']))}">{$item['groupname']}</a>
{/loop}
-->




</div>

</div>

<!--
  <div class="panel panel-default">
    <div class="panel-heading">推荐阅读</div>
    <div class="panel-body">
<div class="commlist">
<ul>
{loop $arrRecommend $key $item}
<li><a href="{tsUrl('task','show',array('id'=>$item['taskid']))}{$mylink}">{$item['title']}</a></li>
{/loop}
</ul>
</div>
</div>
</div>

  <div class="panel panel-default">
    <div class="panel-heading">一周热门</div>
    <div class="panel-body">
<div class="commlist">
<ul>
{loop $arrHot7 $key $item}
<li><a href="{tsUrl('task','show',array('id'=>$item['taskid']))}{$mylink}">{$item['title']}</a></li>
{/loop}
</ul>
</div>
</div>
</div>

  <div class="panel panel-default">
    <div class="panel-heading">一月热门</div>
    <div class="panel-body">
<div class="commlist">
<ul>
{loop $arrHot30 $key $item}
<li><a href="{tsUrl('task','show',array('id'=>$item['taskid']))}{$mylink}">{$item['title']}</a></li>
{/loop}
</ul>
</div>
</div>
</div>

-->
<!--广告位-->
{php doAction('gobad','300')}


</div>





</div>
</div>

<script>
  function jumptype(typeid){
    var url = '{SITE_URL}index.php?app=task&ac=index&typeid='+typeid;
    window.location.href=url;
  }
</script>

{template footer}